package com.lijian.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lijian.common.easyui.tree.EasyuiTreeNode;
import com.lijian.service.ItemCatService;

/**
 * <p>Title: ItemCatController.java</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2017</p>
 * @author lijian
 * @date 2017年3月12日下午9:46:55
 * @version 1.0
 */
@Controller
@RequestMapping("/item/cat")
public class ItemCatController {
	
	@Autowired
	private ItemCatService itemCatService;
	
	@RequestMapping(value="/list",method=RequestMethod.POST)
	@ResponseBody
	public List<EasyuiTreeNode> getItemCatList(@RequestParam(value="id",defaultValue="0") Long parentId){
		return itemCatService.getItemCatList(parentId);
	}
}
